package meng.study.redis.jedis;

import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPubSub;

/**
 * 消息订阅方
 * 
 * @author mengzhang6
 *
 */
public class JedisSub {

	public static void main(String[] args) {
		Jedis jedis = JedisDemo.getJedisInsitution();
		while (true) {
			JedisPubSub jedisPubSub = null;
			jedisPubSub = new MyJedisPubSub();
			String channels1 = "6379";
			String channels2 = "3307";
			jedis.subscribe(jedisPubSub, channels1, channels2);
		}
		// jedis.close();
	}

}
